package com.dragon.graduation.projectApplication.mapper;

import com.dragon.graduation.project.controller.vo.StudentProjectVO;
import com.dragon.graduation.projectApplication.entity.ProjectApplicationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 选题申请表 Mapper 接口
 * </p>
 *
 * @author dragon
 * @since 2025-02-28 21:20:09
 */
@Mapper
public interface ProjectApplicationMapper extends BaseMapper<ProjectApplicationEntity> {

    @Select("select * from db_project_application where project_id = #{projectId} and student_id = #{studentId} and status!=2")
    ProjectApplicationEntity selectByProjectIdAndStudentId(@Param("projectId") Integer projectId, @Param("studentId") Integer studentId);

    List<StudentProjectVO> selectByStudentId(Integer id);
}
